<?php
/**
 * @package		Joomla.Site
 * @subpackage	com_users
 * @copyright	Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 * @since		1.5
 */

defined('_JEXEC') or die;
JHtml::_('behavior.keepalive');
$login_fail = JRequest::getVar('log');
?>
<div class="login<?php echo $this->pageclass_sfx?>">
	<?php if ($this->params->get('show_page_heading')) : ?>
	<h1>
		<?php echo $this->escape($this->params->get('page_heading')); ?>
	</h1>
	<?php endif; ?>

	<?php if (($this->params->get('logindescription_show') == 1 && str_replace(' ', '', $this->params->get('login_description')) != '') || $this->params->get('login_image') != '') : ?>
	<div class="login-description">
	<?php endif ; ?>

		<?php if($this->params->get('logindescription_show') == 1) : ?>
			<?php echo $this->params->get('login_description'); ?>
		<?php endif; ?>

		<?php if (($this->params->get('login_image')!='')) :?>
			<img src="<?php echo $this->escape($this->params->get('login_image')); ?>" class="login-image" alt="<?php echo JTEXT::_('COM_USER_LOGIN_IMAGE_ALT')?>"/>
		<?php endif; ?>

	<?php if (($this->params->get('logindescription_show') == 1 && str_replace(' ', '', $this->params->get('login_description')) != '') || $this->params->get('login_image') != '') : ?>
	</div>
	<?php endif ; ?>
	<div class="box-list">
		<div class="head-title"><h2>Log in</h2></div>
		<table border="0" cellpadding="0" cellspacing="0" width="100%">
		<tr>
			<td valign="top" width="48%" style="background-color: #EEEEEE;border: 1px solid #d6d6d6">
				<form action="<?php echo JRoute::_('index.php?option=com_users&task=user.login'); ?>" method="post">
					<div style="padding: 5px 20px;">
						<table border="0" cellpadding="0" cellspacing="0" width="100%">
						<tr>
							<td><img src="images/login_account.jpg" border="0" /></td>
							<td valign="middle" class="login-text"><h3><?php echo JText::_('Login with your TS account');?></h3></td>
						</tr>
						<tr height="5"><td></td></tr>
						</table>						
						<fieldset>
							<div class="login-fields"><b><label class="" for="username" id="username-lbl">User name</label></b><br>
									<input type="text" style="border: 1px solid #d5d5d5;height: 22px" size="45" class="validate-email" value="" id="username" name="username"></div>
							<div class="login-fields"><b><label class="" for="password" id="password-lbl">Password</label></b><br>
									<input type="password" size="45" style="border: 1px solid #d5d5d5;height: 22px" class="validate-password" value="" id="password" name="password"></div>
							<?php /* foreach ($this->form->getFieldset('credentials') as $field): ?>
								<?php if (!$field->hidden): ?>
									<div class="login-fields" style="padding-bottom: 10px;"><b><?php echo $field->label; ?></b><br />
									<?php echo $field->input; ?></div>
								<?php endif; ?>
							<?php endforeach; */?>
							<div style="padding-bottom: 10px;" id="uniform-mod_voteid9">
											
									<label><input id="modlgn_remember" type="checkbox" name="remember" value="yes" alt="Remember Me" /> <?php echo JText::_('Remember me in this marchine'); ?></label>
								
							</div>
							<div style="border-bottom: 1px solid #CCCCCC;"></div>
							<p>
								<a href="<?php echo JRoute::_('index.php?option=com_users&view=reset'); ?>">
								<?php echo JText::_('COM_USERS_LOGIN_RESET'); ?></a>
							</p>
							<p><button type="submit" class="gradient-button-yellow"><?php echo JText::_('JLOGIN'); ?></button></p>
							<input type="hidden" name="return" value="<?php echo base64_encode($this->params->get('login_redirect_url', $this->form->getValue('return'))); ?>" />					
							<p><a class="secondary-link" href="<?php echo JRoute::_('index.php?option=com_content&view=article&id=11&Itemid=133');?>">Privacy &amp; Security</a></p>
							<?php echo JHtml::_('form.token'); ?>
						</fieldset>
					</div>
				</form>
			</td>
			<td align="center">&nbsp;</td>
			<td valign="top" width="48%" style="background-color: #EEEEEE;border: 1px solid #d6d6d6">
				<div style="padding: 5px 20px; background-color: #EEEEEE">
					<table border="0" cellpadding="0" cellspacing="0" width="100%">
					<tr>
						<td><img src="images/register_account.jpg" border="0" /></td>
						<td valign="middle" class="login-text"><h3><?php echo JText::_('COM_USERS_DONT_HAVE_A_TS_ACCOUNT_YET');?></h3></td>
					</tr>
					<tr height="5"><td></td></tr>
					</table>					
					<p><?php echo JText::_('COM_USERS_BECOME_A_CANDIDATE_WITHIN_TS');?></p>
					<p><a href="#"><?php echo JText::_('COM_USERS_LEARN_MORE_ABOUT_CANDIDATE_BENEFIT');?></a></p>
					<p>
					<?php 
						$usersConfig = JComponentHelper::getParams('com_users');
						//if ($usersConfig->get('allowUserRegistration')) : 
					?>
						<button class="gradient-button-yellow" onclick="document.location='<?php echo JRoute::_('index.php?option=com_users&view=registration'); ?>'">					
							<?php echo JText::_('Register here'); ?>
						</button>
					<?php //endif; ?>
					</p>
                    <p>- OR -</p>
                    <p><?php echo JText::_('COM_USERS_BECOME_AN_EMPLOYER_WITHIN_TS');?></p>
					<p><a href="#"><?php echo JText::_('COM_USERS_LEARN_MORE_ABOUT_EMPLOYER_BENEFIT');?></a></p>
					<p>
					<?php 
						$usersConfig = JComponentHelper::getParams('com_users');
						//if ($usersConfig->get('allowUserRegistration')) : 
					?>
						<button class="gradient-button-yellow" onclick="document.location='<?php echo JRoute::_('index.php?option=com_users&view=registration&layout=default_employer'); ?>'">					
							<?php echo JText::_('Register here'); ?>
						</button>
					<?php //endif; ?>
					</p>
				</div>
			</td>
		</tr>
		</table>
	</div>
</div>
<div>
	<ul>
		<!--<li>
			<a href="<?php echo JRoute::_('index.php?option=com_users&view=reset'); ?>">
			<?php echo JText::_('COM_USERS_LOGIN_RESET'); ?></a>
		</li>-->
		<!--<li>
			<a href="<?php echo JRoute::_('index.php?option=com_users&view=remind'); ?>">
			<?php echo JText::_('COM_USERS_LOGIN_REMIND'); ?></a>
		</li>-->
		<?php
		/*$usersConfig = JComponentHelper::getParams('com_users');
		if ($usersConfig->get('allowUserRegistration')) : ?>
		<li>
			<a href="<?php echo JRoute::_('index.php?option=com_users&view=registration'); ?>">
				<?php echo JText::_('COM_USERS_LOGIN_REGISTER'); ?></a>
		</li>
		<?php endif; */?>
	</ul>
</div>
